﻿/*
* ============================================================================
* GNU Lesser General Public License
* ============================================================================
*
* BYDAN - Free Java BYDAN library.
* Copyright (C) 2008 
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
* 
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
* 
* BYDAN Corporation
*/
package ByDan.AulaVirtual.Presentation.Reporte.Source;

import java.util.ArrayList;
import ByDan.Framework.AulaVirtual.Business.Entities.GeneralEntity;
import ByDan.Framework.AulaVirtual.Business.Entities.Mensajes;
import ByDan.Framework.AulaVirtual.Utils.ParameterDbType;
import ByDan.Framework.AulaVirtual.Utils.ParameterType;
import ByDan.Framework.AulaVirtual.Utils.ParametersMaintenance;
import ByDan.Framework.AulaVirtual.Utils.ParameterMaintenance;
import ByDan.Framework.AulaVirtual.Utils.ParameterValue;
import ByDan.Framework.AulaVirtual.Utils.ParametersType;
import ByDan.AulaVirtual.Business.Entities.*;
import ByDan.AulaVirtual.Business.Logic.TutorLogic;
import ByDan.AulaVirtual.Business.Logic.TutorLogicAdditional;
import ByDan.Framework.AulaVirtual.Utils.DeepLoadType;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import java.sql.*;

public class TutorBean extends Tutor
{
	
	
	Object relationship_unidadcurricularsDescripcionReporte;
	
	
	public Object getRelationship_unidadcurricularsDescripcionReporte()
	{
		return relationship_unidadcurricularsDescripcionReporte;
	}

	
	
	public  void  setRelationship_UnidadCurricularDescripcionReporte(Object unidadcurriculars)
	{
		try
		{
			this.relationship_unidadcurricularsDescripcionReporte=unidadcurriculars;
		}
		catch(Exception ex)
		{
			;
		}
	}

	
	
	String field_bigIdTipoCertificacionDescripcionReporte;
	
	
	String field_bitEstadoDescripcionReporte;
	
	
				
	public TutorBean  ()
    {
 		field_bigIdTipoCertificacionDescripcionReporte="";
 		
 		
 		field_bitEstadoDescripcionReporte="";
 		
 		
    } 
	
	     
    
	public String getField_bigIdTipoCertificacionDescripcionReporte()
	{
		return field_bigIdTipoCertificacionDescripcionReporte;
	}
    
    
    
	public String getField_bitEstadoDescripcionReporte()
	{
		return field_bitEstadoDescripcionReporte;
	}
    
    
	
    
	public void setField_bigIdTipoCertificacionDescripcionReporte(String newField_bigIdTipoCertificacionDescripcionReporte)throws Exception
	{
		try
		{
			this.field_bigIdTipoCertificacionDescripcionReporte=newField_bigIdTipoCertificacionDescripcionReporte;
		}
		catch(Exception ex)
		{
			throw ex;
		}
	}
    
    
    
	public void setField_bitEstadoDescripcionReporte(String newField_bitEstadoDescripcionReporte)throws Exception
	{
		try
		{
			this.field_bitEstadoDescripcionReporte=newField_bitEstadoDescripcionReporte;
		}
		catch(Exception ex)
		{
			throw ex;
		}
	}
    
    
		
	public static ArrayList<TutorBean> TraerTutorBeans(ArrayList<Tutor> tutors)throws Exception
    {
		ArrayList<TutorBean> tutorbeans=new ArrayList<TutorBean>();	
		TutorBean tutorbean;
				
		try
		{
			for(Tutor tutor:tutors)
			{
			
				tutorbean=new TutorBean();
				
				tutorbean.setId(tutor.getId());	
				tutorbean.setVersionRow(tutor.getVersionRow());	
				tutorbean.setField_bigIdTipoCertificacion(tutor.getField_bigIdTipoCertificacion());
				tutorbean.setField_bigIdTipoCertificacionDescripcionReporte(TutorLogicAdditional.getRelationship_TipoCertificacionDescripcion(tutor.getRelationship_TipoCertificacion()));	
				tutorbean.setField_strCedula(tutor.getField_strCedula());	
				tutorbean.setField_strNombre(tutor.getField_strNombre());	
				tutorbean.setField_bitEstado(tutor.getField_bitEstado());
				tutorbean.setField_bitEstadoDescripcionReporte(TutorLogicAdditional.getEstadoDescripcion(tutor));	
				tutorbean.setField_strNumerotelefono(tutor.getField_strNumerotelefono());	
				tutorbean.setField_strObservaciones(tutor.getField_strObservaciones());	
				
				
				tutorbean.setRelationship_UnidadCurricularDescripcionReporte(new JRBeanCollectionDataSource(UnidadCurricularBean.TraerUnidadCurricularBeans(tutor.getRelationship_unidadcurriculars())));	
							
				tutorbeans.add(tutorbean);
			}
		}
		catch(Exception ex)
		{
			throw ex;
		}
		
		return tutorbeans;
    }
}
